home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / make / icmake-6.000 / icmake-6 / icmake / comp / bor.c < prev    next >
Encoding:
C/C++ Source or Header  |  1994-02-08  |  651 b   |  28 lines

  1. /*
  2.                             B O R . C
  3. */
  4.  
  5. #include "iccomp.h"
  6.  
  7. ESTRUC_ *bor (lval, rval)
  8.     ESTRUC_
  9.         *lval,
  10.         *rval;
  11. {
  12.     if (test_binop(op_bor, lval, rval))
  13.         return (lval);                      /* test for correct types */
  14.  
  15.     btoi(lval);                             /* convert pending booleans */
  16.     btoi(rval);
  17.  
  18.     if (conflict(lval, rval, op_bor))       /* test type conflict */
  19.         return(lval);
  20.  
  21.     if ((lval->type & rval->type & ~ALLTYPES) == e_const)
  22.         lval->evalue |= rval->evalue;
  23.     else
  24.         defcode(lval, rval, op_bor);
  25.  
  26.     return (lval);                          /* return new expression */
  27. }
  28.